﻿
@{
    ViewBag.Title = "register";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>register</h2>

<div>
    <input type="text" id="userName" />
    <input type="text" id="password" />
    <input type="button" id="sub" onclick="submit()" value="注册"/>
</div>

<script type="text/javascript">
    function submit() {
        debugger
        var username = $("#userName").val();
        var password = $("#password").val();
        var inputData = {
            UserName: username,
            UserPassword: password
        }
        $.ajax({
            url: "/Home/submitReg",
            method: "POST",
            data: inputData
        })

    }
</script>